package com.uwo.commons.samples.response;

import com.uwo.commons.configuration.aop.validate.excepteion.CommonResponse;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 返回结果
 * @author hao.yan
 */
@Component("testResponse")
public class TestResponse implements CommonResponse{

    public Object responseHandler(Integer code, String message, Object... params) {
        Map<String, Object> result = new HashMap<String, Object>();
        result.put("errcode", code);
        result.put("message", message);
        return result;
    }
}
